package com.hangzhou.xyj.net.request;

import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.hangzhou.xyj.net.request.base.BaseRequest;
import com.hangzhou.xyj.utils.constants.API;

/**
 * Created by yaohuix on 2016/2/24  13:33
 * <p/>
 * 说明：取消关注 请求
 */
public class CancelFollowReq extends BaseRequest {
    public static final int TYPE_USER = 1;//用户
    public static final int TYPE_GROUP = 2;//圈子
    public static final int TYPE_DYNAMIC = 3;//动态
    /**
     * @param followId 要取消关注的用户的Id
     * @param type     关注类型 1用户 2圈子 3动态
     * @return
     * @Description
     * @author yaohuix
     * @date 2016/2/24 13:39
     */
    public CancelFollowReq(int type, int followId, int userId) {
        JsonObject jsonObject = new JsonObject();
        jsonObject.addProperty("followId", followId);
        jsonObject.addProperty("userId", userId);
        jsonObject.addProperty("type", type);
        String jsonStr = new Gson().toJson(jsonObject);
        add("data", jsonStr);
    }

    @Override
    public String getUrl() {
        return API.MY_CANCEL_FOLLOW;
    }
}
